package com.aduerr.v1shouyin.unioncard;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.aduerr.v1shouyin.R;


/**
 * @author HI
 * @email dev1024@foxmail.com
 * @time 2019/7/15 16:35
 * @change
 * @chang 2020/02/28
 * @class 乐刷换了sdk，这个Activity没用了
 */

public class UnionCompleteActivity extends AppCompatActivity {

    @BindView(R.id.img_back)
    ImageView imgBack;
    @BindView(R.id.bt_confirm)
    Button btConfirm;
    @BindView(R.id.tv_transaction_type)
    TextView tvTransactionType;

    int type; //1:消费，2：退款

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_union_complete);
        ButterKnife.bind(this);
        type = getIntent().getIntExtra("type", 0);
        if(type == 1) {
            tvTransactionType.setText("交易成功，请提示顾客取卡");
        } else if(type == 2) {
            tvTransactionType.setText("退款成功，请提示顾客取卡");
        }
    }

    @OnClick({R.id.img_back, R.id.bt_confirm})
    public void onViewClicked(View view) {
        switch(view.getId()) {
            case R.id.img_back:
            case R.id.bt_confirm:
                finish();
                break;
        }
    }
}
